/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.tika.async.cli;

import org.apache.tika.sax.BasicContentHandlerFactory;

class SimpleAsyncConfig {

    private String inputDir;
    private String outputDir;
    private Integer numClients;
    private Long timeoutMs;
    private String xmx;
    private String fileList;
    private String tikaConfig;//path to the tikaConfig file to be used in the forked process
    private boolean extractBytes;
    private final BasicContentHandlerFactory.HANDLER_TYPE handlerType;
    private final String pluginsDir;
    //TODO -- switch to a builder
    public SimpleAsyncConfig(String inputDir, String outputDir, Integer numClients, Long timeoutMs, String xmx, String fileList,
                             String tikaConfig, BasicContentHandlerFactory.HANDLER_TYPE handlerType, boolean extractBytes,
                             String pluginsDir) {
        this.inputDir = inputDir;
        this.outputDir = outputDir;
        this.numClients = numClients;
        this.timeoutMs = timeoutMs;
        this.xmx = xmx;
        this.fileList = fileList;
        this.tikaConfig = tikaConfig;
        this.handlerType = handlerType;
        this.extractBytes = extractBytes;
        this.pluginsDir = pluginsDir;
    }

    public String getInputDir() {
        return inputDir;
    }

    public String getOutputDir() {
        return outputDir;
    }

    public Integer getNumClients() {
        return numClients;
    }

    public Long getTimeoutMs() {
        return timeoutMs;
    }

    public String getXmx() {
        return xmx;
    }

    public String getFileList() {
        return fileList;
    }

    public String getTikaConfig() {
        return tikaConfig;
    }

    public boolean isExtractBytes() {
        return extractBytes;
    }

    public BasicContentHandlerFactory.HANDLER_TYPE getHandlerType() {
        return handlerType;
    }

    public String getPluginsDir() {
        return pluginsDir;
    }

    @Override
    public String toString() {
        return "SimpleAsyncConfig{" +
                "inputDir='" + inputDir + '\'' +
                ", outputDir='" + outputDir + '\'' +
                ", numClients=" + numClients +
                ", timeoutMs=" + timeoutMs +
                ", xmx='" + xmx + '\'' +
                ", fileList='" + fileList + '\'' +
                ", tikaConfig='" + tikaConfig + '\'' +
                ", extractBytes=" + extractBytes +
                ", handlerType=" + handlerType +
                ", pluginsDir='" + pluginsDir + '\'' +
                '}';
    }
}
